package com.taobao.server;

import java.util.ArrayList;
import java.util.List;

import com.taobao.pojo.Line;
import com.taobao.pojo.TBMessage;
import com.taobao.tools.OrderMap;

public interface ConfigServer {

    public final String SYSTEMCONFIG = "System config_0_1";
    public final String USERLIST = "User list_1_2";
    public final String VERSION = "Version_1_1";
    public final String NTP = "NTP_0_3";
    public final String DAO = "Dao_0_6";
    public final String SERVER = "Server_0_4";
    public final String FILTER = "Filter_0_5";
    public final String SMALLERS = "Smallers_0_7";
    public final String Menu = "Menu_0_8";

    public final List<String> titles = new ArrayList<String>();

    public final OrderMap lines = new OrderMap();

    public TBMessage load();

    public List<Line> getUnit(String titleName);

    public Line getLine(String titleName, String key);

    public void add(String titleName, String key, String value);

    public void update(String titleName, String key, String value);

    public TBMessage updateObject(String titleName, Object obj);

    public void delete(String titleName, String key);

    public void deleteAll(String titleName);

    public void updateAll(String titleName, List<Line> lines);
}
